import { Toast } from 'antd-mobile';

export const dva = {
  config: {
    onError(err) {
      err.preventDefault();
      console.error(err.message);
    },
  },
};

const width = document.documentElement.clientWidth;

const isBusinessMatchPage = window.location.href.indexOf('business-match') > -1;
console.log(isBusinessMatchPage);
document.title = isBusinessMatchPage ? 'CHINACYCLE 线上贸易对接会' : 'Chinacycle';

if (width > 1000) {
  if (isBusinessMatchPage) {
    alert('请从手机端进入此页面');
  } else {
    window.location.href = 'http://online.e-chinacycle.com/';
  }
}
